package com.ramms.eater.manager;

import com.ramms.eater.activity.MainActivity;
import com.ramms.eater.util.Constants;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;

public class OnClickListenerManager {

	private final Activity parent;
	
	public OnClickListenerManager(Activity parent) {
		this.parent = parent;
	}
	
	public OnClickListener getListenerByEntityType(String type) {
		if(type.equals(Constants.TYPE_ARTICLE)) {
			return new OnClickListener() {
				
				@Override
				public void onClick(View arg0) {
					Intent intent = new Intent(parent, MainActivity.class);
					parent.startActivity(intent);
				}
			};
			
		}
		return null;
	}
	
}
